/**
 * 
 */
package model.container;

import model.Lector;

import java.util.HashMap;
import java.util.Iterator;


/**
 * @ Authors:
 * 
 * @Veronique De Laet
 * @Johan Willems
 * @Pierre Delaere
 * 
 * @version 2011
 */
public class Lectoren implements Iterable<Lector>
{
	public static HashMap<String, Lector> lectorenLijst = new HashMap<String, Lector>();
	
	public Lectoren ()
	{
		//do nothing
	}
	

	/**
	 * addLector -- Voeg je een lector toe aan de lijst
	 * @param lector
	 */
	public void addLector(Lector deLector)
	{
		lectorenLijst.put(deLector.getLectorCode(),deLector);
	}
	
	public Lector leesLectorenVanBestand (String lectorCode)
	{
		Lector deLector = new Lector();
		deLector = (Lector) lectorenLijst.get(lectorCode);
		return deLector;
	}
	
	@Override
	public Iterator<Lector> iterator() {
		 Iterator<Lector> itr = lectorenLijst.values().iterator();
		 return  itr;
	}

}
